import { ajax } from '../http.js';

const findMyPageUrl = '/authc/hot_sale/product/find_my_page';
const hotSaleStatUrl = '/authc/hot_sale/product/hot_sale_stat';
const auditCountUrl = '/authc/hot_sale/product/find_audit_count';
const hotStatUrl = '/authc/hot_sale/order/stat';

// 爆品管理
const findMyPage = (data, success, fail) => {
  ajax({
    apiUrl: '/hotapi',
    url: findMyPageUrl,
    data: data,
    success: success,
    fail: fail
  });
};

// 爆品订单
const hotSaleSta = (data, success, fail) => {
  ajax({
    apiUrl: '/hotapi',
    url: hotSaleStatUrl,
    data: data,
    success: success,
    fail: fail
  });
};

// 爆品审核失败数量
const auditCount = (data, success, fail) => {
  ajax({
    apiUrl: '/hotapi',
    url: auditCountUrl,
    data: data,
    success: success,
    fail: fail
  });
};
// 商家爆品统计
const hotStat = (data, success, fail) => {
  ajax({
    apiUrl: '/hotapi',
    url: hotStatUrl,
    data: data,
    success: success,
    fail: fail
  });
};

export {
  findMyPage,
  hotSaleSta,
  auditCount,
  hotStat
}